import {
	request,
	upload
} from '@/assets/api/index.js'

const getCommonCheckListApi = (meMemorialId, ccType) => request("GET",
	'/memories/commonChecklist/list?pageSize=999&meMemorialId=' +
	meMemorialId + '&ccType=' + ccType)

const addArticleApi = (data) => request("POST", '/memories/article', data)

const getArticleApi = (meMemorialId) => request("GET", '/memories/article/list?pageSize=999&meMemorialId=' +
	meMemorialId)

const delArticleApi = (meMemorialId) => request("DELETE", `/memories/article/${meMemorialId}`)

const addCommonCheckListApi = (data) => request("POST", '/memories/commonChecklist', data)

const updateCommonCheckListApi = (data) => request("PUT", '/memories/commonChecklist', data)

const delCommonCheckListApi = (id) => request("DELETE", `/memories/commonChecklist/${id}`)

const uploadApi = (tempFilePath) => upload('common_checklist', 'ccContent', tempFilePath)

export {
	getCommonCheckListApi,
	addCommonCheckListApi,
	updateCommonCheckListApi,
	delCommonCheckListApi,
	delArticleApi,
	uploadApi,
	getArticleApi,
	addArticleApi,
}